package cn.com.roy.thread.t4_1_12.lockmethodtest1;

public class Run {
    //
    public static void main(String[] args) {
        final  MyService service = new MyService(true);
        Runnable runnable = new Runnable() {
            public void run() {
                service.testMethod();
            }
        };
        Thread ta = new Thread(runnable);
        ta.start();

        final  MyService service2 = new MyService(false);
        Runnable runnable2 = new Runnable() {
            public void run() {
                service2.testMethod();
            }
        };
        Thread tb = new Thread(runnable2);
        tb.start();
    }
}
